# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: arkhan <arkhan@disroot.org>

pkgname=ueberzug
pkgver=18.2.0
pkgrel=2
pkgdesc='Command line util which allows to display images in combination with X11'
arch=('loong64' 'x86_64')
url=https://github.com/ueber-devel/ueberzug
license=('GPL3')
depends=('libxext' 'libxres' 'python-attrs' 'python-docopt' 'python-pillow')
makedepends=('python-build' 'python-installer' 'python-setuptools'
             'python-wheel')
provides=("python-$pkgname")
replaces=("python-$pkgname")
source=("https://github.com/ueber-devel/ueberzug/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('091975b68ddba56789258c7e9a30a0d6c13c46dfcbfc6451c8c4d15907acb6e2')
b2sums=('cc843433ba01de1bfa65ac0bc5632094bd2b0a4dbc8d2638a21dceffb6f9019257b7116198802d822477c3e10c9d2a82c52d136697a58cbace01666b7188f20e')

build() {
  cd $pkgname-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
